//2009/08/19 21:42:57
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class InsertionSortCount
{
public:
    int countMoves(vector <int> A)
    {
		int ret = 0;
		for(int i=0; i<A.size(); i++)
		{
			for(int j=0; j<i; j++)
			{
				if(A[i] < A[j]) ret ++;
			}
		}
		return ret;
    }
};
